fix: prevent MC791596 banner migration for pages with no header#1758
fix: prevent MC791596 banner migration for pages with no header#1758
Conversation
When saving a page with PageHeaderType.None, the legacy NoHeader() HTML was written to LayoutWebpartsContent. SharePoint's MC791596 migration detects this HTML on first browser open and injects a full-width Banner web part into CanvasContent1, causing an unwanted header to appear on pages created from the template. Write string.Empty instead of NoHeader() to avoid triggering the migration. Also skip the entire header persistence block for Home layout pages, which do not support a banner header.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1758 +/- ##
==========================================
- Coverage 82.42% 81.25% -1.17%
==========================================
Files 416 637 +221
Lines 28590 45388 +16798
Branches 0 4778 +4778
==========================================
+ Hits 23565 36880 +13315
- Misses 5025 7099 +2074
- Partials 0 1409 +1409 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for dropping a PR and helping us out. We will try to review it ASAP. |
Gotcha, thanks for sharing 👍. If you have more improvements/fixes done locally, please do share them as well 👍 |
fix: prevent MC791596 banner migration for pages with no header
When saving a page with PageHeaderType.None, the legacy NoHeader() HTML
was written to LayoutWebpartsContent. SharePoint's MC791596 migration
detects this HTML on first browser open and injects a full-width Banner
web part into CanvasContent1, causing an unwanted header to appear on
pages created from the template.
Write string.Empty instead of NoHeader() to avoid triggering the migration.
Also skip the entire header persistence block for Home layout pages, which
do not support a banner header.
This might also fix #1718